<template>
  <div>
    <div  v-if="!setting.readonly" style="margin-bottom: 20px;">
      <el-button
        size="small"
        @click="addTab()"
      >
        增加资产
      </el-button>
    </div>
    <el-tabs v-model="editableTabsValue" type="card" closable @tab-remove="removeTab">
      <el-tab-pane
        v-for="(item, index) in editableTabs"
        :key="item.name"
        :label="item.title"
        :name="item.name"
      >
        <el-steps :active="item['active']" finish-status="success">
          <el-step title="基础信息"></el-step>
          <el-step title="权证信息"></el-step>
          <el-step title="面积及可租信息"></el-step>
          <el-step title="资产近照"></el-step>
        </el-steps>

        <el-button style="margin-top: 12px;" @click="next(item)">下一步</el-button>
        <el-button style="margin-top: 12px;" @click="nextS(item)">上一步</el-button>


        <el-row :gutter="15">

            <el-form  :ref="'elForm' + item.name" :model="item.content" :rules="item.dataRule" label-position="right" label-width="160px" size="medium"

          >

              <div v-show="item['active'] == 0">
                <el-row>
                  <el-col :span="24" v-if="!setting.readonly"
                  >
                    <el-form-item label="流程标题"
                                  prop="title"
                    >
                      <el-input v-model="item.content.title" v-if="!setting.readonly"
                                placeholder="请输入" clearable :style='{"width":"100%"}'
                      >
                      </el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :span="8" v-if="judgeShow('zcLabel')"
                  >
                    <el-form-item label="资产类别"
                                  prop="assetClass"
                    >
                      <el-select v-model="item.content.assetClass" v-if="!setting.readonly"
                                 placeholder="请选择" :disabled="judgeWrite('assetClass')" clearable :style='{"width":"100%"}'
                      >
                        <el-option v-for="(item, index) in assetClassOptions" :key="index" :label="item.fullName"
                                   :value="item.enCode" :disabled="item.disabled"
                        ></el-option>
                      </el-select>
                      <span class="value"
                            v-if="setting.readonly">{{ getOptionLabel(assetClassOptions, item.content.assetClass) || '-' }}</span>
                    </el-form-item>
                  </el-col>


                  <el-col :span="8" v-if="judgeShow('zcType')"
                  >
                    <el-form-item label="资产类型"
                                  prop="zcType"
                    >
                      <el-select v-model="item.content.zcType" v-if="!setting.readonly"
                                 placeholder="请选择" :disabled="judgeWrite('zcType')" clearable :style='{"width":"100%"}'
                      >
                        <el-option v-for="(item, index) in assetTypeOptions" :key="index" :label="item.fullName"
                                   :value="item.enCode" :disabled="item.disabled"
                        ></el-option>
                      </el-select>
                      <span class="value"
                            v-if="setting.readonly">{{ getOptionLabel(assetTypeOptions, item.content.zcType) || '-' }}</span>
                    </el-form-item>
                  </el-col>




                  <el-col :span="8" v-if="judgeShow('zcNumber')"
                  >
                    <el-form-item label="资产编号"
                                  prop="zcNumber"
                    >
                      <el-input v-model="item.content.zcNumber" v-if="!setting.readonly"
                                placeholder="请输入" :disabled="judgeWrite('zcNumber')" clearable :style='{"width":"100%"}'
                      >
                      </el-input>
                      <span class="value" v-if="setting.readonly">{{ item.content.zcNumber || '-' }}</span>
                    </el-form-item>
                  </el-col>

                  <el-col :span="8" v-if="judgeShow('zcName')"
                  >
                    <el-form-item label="资产名称"
                                  prop="zcName"
                    >
                      <el-input v-model="item.content.zcName" v-if="!setting.readonly"
                                placeholder="请输入" :disabled="judgeWrite('zcName')" clearable :style='{"width":"100%"}'
                      >
                      </el-input>
                      <span class="value" v-if="setting.readonly">{{ item.content.zcName || '-' }}</span>
                    </el-form-item>
                  </el-col>
                  <el-col :span="8" v-if="judgeShow('address')"
                  >
                    <el-form-item label="所属项目"
                                  prop="belongingProject"
                    >
                      <el-input v-model="item.content.belongingProject" v-if="!setting.readonly"
                                placeholder="请输入" :disabled="judgeWrite('belongingProject')" clearable
                                :style='{"width":"100%"}'
                      >

                      </el-input>
                      <span class="value" v-if="setting.readonly">{{ item.content.belongingProject || '-' }}</span>
                    </el-form-item>
                  </el-col>

                  <el-col :span="8" v-if="judgeShow('address')"
                  >
                    <el-form-item label="所属楼栋"
                                  prop="belongingBuilding"
                    >
                      <el-input v-model="item.content.belongingBuilding" v-if="!setting.readonly"
                                placeholder="请输入" :disabled="judgeWrite('belongingBuilding')" clearable
                                :style='{"width":"100%"}'
                      >

                      </el-input>
                      <span class="value" v-if="setting.readonly">{{ item.content.belongingBuilding || '-' }}</span>
                    </el-form-item>
                  </el-col>
                </el-row>

                <el-row>
<!--                  <el-col :span="8" v-if="judgeShow('address')">-->
<!--                    <el-form-item label="区域" prop="address">-->
<!--                      <div class="address-selector">-->
<!--                        <div class="select-group">-->
<!--                          <div class="select-wrapper">-->
<!--                            <select v-model="selectedProvince" @change="onProvinceChange">-->
<!--                              <option value="">请选择省份</option>-->
<!--                              <option v-for="province in provinces" :value="province.adcode">{{ province.name }}</option>-->
<!--                            </select>-->
<!--                          </div>-->

<!--                          <div class="select-wrapper">-->
<!--                            <select v-model="selectedCity" @change="onCityChange" :disabled="!cities.length">-->
<!--                              <option value="">请选择城市</option>-->
<!--                              <option v-for="city in cities" :value="city.adcode">{{ city.name }}</option>-->
<!--                            </select>-->
<!--                          </div>-->

<!--                          <div class="select-wrapper">-->
<!--                            <select v-model="selectedDistrict" @change="onDistrictChange" :disabled="!districts.length">-->
<!--                              <option value="">请选择区县</option>-->
<!--                              <option v-for="district in districts" :value="district.adcode">{{ district.name }}</option>-->
<!--                            </select>-->
<!--                          </div>-->

<!--                          <div class="select-wrapper">-->
<!--                            <select v-model="selectedStreet" @change="onStreetChange" :disabled="!streets.length">-->
<!--                              <option value="">请选择街道</option>-->
<!--                              <option v-for="street in streets" :value="street.adcode">{{ street.name }}</option>-->
<!--                            </select>-->
<!--                          </div>-->
<!--                        </div>-->

<!--                      </div>-->
<!--                    </el-form-item>-->
<!--                  </el-col>-->

                  <el-col :span="8" v-if="judgeShow('address')">


                    <el-form-item label="坐落位置" prop="address">
                      <div v-if="!setting.readonly">
                        <el-input v-model="item.content.address" :disabled="judgeWrite('address')" clearable
                                  :style='{"width":"100%"}'></el-input>
                        <el-button @click="openDialog">选择位置</el-button>
                        <span class="value" v-if="!setting.readonly && item.content.longitude" style="color:grey;font-size:12px" >(经度：{{dataForm.longitude}},维度：{{dataForm.latitude}})</span>
                      </div>
                      <span class="value" v-if="setting.readonly">{{ item.content.address || '-' }}{{item.content.longitude}},{{item.content.latitude}}</span>
                    </el-form-item>
                  </el-col>
                  <el-col :span="8" v-if="judgeShow('address')"
                  >
                    <el-form-item label="资产使用情况"
                                  prop="zcStatus"
                    >
                      <el-select v-model="item.content.zcStatus" v-if="!setting.readonly"
                                 placeholder="请选择" :disabled="judgeWrite('zcStatus')" clearable :style='{"width":"100%"}'
                      >
                        <el-option v-for="(item, index) in zcStatusOptions" :key="index" :label="item.fullName"
                                   :value="item.enCode" :disabled="item.disabled"
                        ></el-option>

                      </el-select>
                      <span class="value" v-if="setting.readonly">{{
                          getOptionLabel(zcStatusOptions, item.content.zcStatus) || '-'
                        }}</span>
                    </el-form-item>
                  </el-col>
                  <el-col :span="8" v-if="judgeShow('zcPurpose')"
                  >
                    <el-form-item label="资产用途"
                                  prop="zcPurpose"
                    >
                      <el-select v-model="item.content.zcPurpose" v-if="!setting.readonly"
                                 placeholder="请选择" :disabled="judgeWrite('zcPurpose')" clearable
                                 :style='{"width":"100%"}'
                      >
                        <el-option v-for="(item, index) in zcPurposeOptions" :key="index" :label="item.fullName"
                                   :value="item.enCode" :disabled="item.disabled"
                        ></el-option>

                      </el-select>
                      <span class="value"
                            v-if="setting.readonly">{{ getOptionLabel(zcPurposeOptions, dataForm.zcPurpose) || '-' }}</span>
                    </el-form-item>
                  </el-col>

                  <el-col :span="8" v-if="judgeShow('zcPurposeDescribe') &&  item.content.zcPurpose=='其他'"
                  >
                    <el-form-item label="其他用途说明"
                                  prop="zcPurposeDescribe"
                    >
                      <el-input v-model="item.content.zcPurposeDescribe" v-if="!setting.readonly"
                                placeholder="请输入" :disabled="judgeWrite('zcPurposeDescribe')" clearable :style='{"width":"100%"}'
                      >

                      </el-input>
                      <span class="value" v-if="setting.readonly">{{ item.content.zcPurposeDescribe || '-' }}</span>
                    </el-form-item>
                  </el-col>


                  <el-col :span="8" v-if="judgeShow('zcSource')"
                  >
                    <el-form-item label="资产来源"
                                  prop="zcSource"
                    >
                      <el-select v-model="item.content.zcSource" v-if="!setting.readonly"
                                 placeholder="请选择" :disabled="judgeWrite('zcSource')" clearable :style='{"width":"100%"}'
                      >
                        <el-option v-for="(item, index) in zcSourceOptions" :key="index" :label="item.fullName"
                                   :value="item.enCode" :disabled="item.disabled"
                        ></el-option>

                      </el-select>
                      <span class="value" v-if="setting.readonly">{{
                          getOptionLabel(zcSourceOptions, item.content.zcSource) || '-'
                        }}</span>
                    </el-form-item>
                  </el-col>

                  <el-col :span="8" v-if="judgeShow('zcSourceDescribe') &&  item.content.zcSource  == '其它'"
                  >
                    <el-form-item label="其他资产来源说明"
                                  prop="zcPurposeDescribe"
                    >
                      <el-input v-model="item.content.zcSourceDescribe" v-if="!setting.readonly"
                                placeholder="请输入" :disabled="judgeWrite('zcSourceDescribe')" clearable :style='{"width":"100%"}'
                      >

                      </el-input>
                      <span class="value" v-if="setting.readonly">{{ item.content.zcSourceDescribe || '-' }}</span>
                    </el-form-item>
                  </el-col>







                  <el-col :span="8" v-if="judgeShow('jnpf_zcgl_zcdj_photo_jnpf_photoTime')"
                  >
                    <el-form-item label="取得日期"
                                  prop="acquisitionDate"
                    >
                      <el-date-picker v-if="!setting.readonly" v-model="item.content.acquisitionDate"
                                      placeholder="请选择" :disabled="judgeWrite('acquisitionDate')"
                                      clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd"
                      >
                      </el-date-picker>

                      <span class="value" v-if="setting.readonly">{{ item.content.acquisitionDate || '-' }}</span>
                    </el-form-item>
                  </el-col>
                  <el-col :span="8" v-if="judgeShow('address')"
                  >
                    <el-form-item label="取得价值(万元)"
                                  prop="acquiringValue"
                    >
                      <el-input v-model="item.content.acquiringValue" v-if="!setting.readonly"
                                placeholder="请输入" :disabled="judgeWrite('acquiringValue')" clearable :style='{"width":"100%"}'
                      >

                      </el-input>
                      <span class="value" v-if="setting.readonly">{{ item.content.acquiringValue || '-' }}</span>
                    </el-form-item>
                  </el-col>

                  <el-col :span="8" v-if="judgeShow('holdingMethod')"
                  >
                    <el-form-item label="持有方式"
                                  prop="holdingMethod"
                    >
                      <el-select v-model="item.content.holdingMethod" v-if="!setting.readonly"
                                 placeholder="请选择" :disabled="judgeWrite('holdingMethod')" clearable :style='{"width":"100%"}'
                      >
                        <el-option v-for="(item, index) in holdingMethodOptions" :key="index" :label="item.fullName"
                                   :value="item.enCode" :disabled="item.disabled"
                        ></el-option>

                      </el-select>
                      <span class="value" v-if="setting.readonly">{{
                          getOptionLabel(holdingMethodOptions, item.content.holdingMethod) || '-'
                        }}</span>
                    </el-form-item>
                  </el-col>
                  <el-col :span="8" v-if="judgeShow('clientFullName') && item.content.holdingMethod!='自持'"
                  >
                    <el-form-item label="委托方全称"
                                  prop="clientFullName"
                    >
                      <el-input v-model="item.content.clientFullName" v-if="!setting.readonly"
                                placeholder="请输入" :disabled="judgeWrite('clientFullName')" clearable :style='{"width":"100%"}'
                      >

                      </el-input>
                      <span class="value" v-if="setting.readonly">{{ item.content.clientFullName }}</span>

                    </el-form-item>
                  </el-col>

                  <el-col :span="8" v-if="judgeShow('zcAdmin')"
                  >
                    <el-form-item label="资产管理员"
                                  prop="zcAdmin"
                    >
                      <user-select v-model="item.content.zcAdmin" v-if="!setting.readonly"
                                   placeholder="请选择" :disabled="judgeWrite('zcAdmin')" clearable
                      >


                      </user-select>
                      <span class="value" v-if="setting.readonly">{{ item.content.zcAdmin }}</span>

                    </el-form-item>
                  </el-col>
                  <!--            <el-col :span="8" v-if="judgeShow('managementUnit')"-->
                  <!--            >-->
                  <!--              <el-form-item label="管理单位"-->
                  <!--                            prop="managementUnit"-->
                  <!--              >-->
                  <!--                <el-select v-model="dataForm.managementUnit" v-if="!setting.readonly"-->
                  <!--                           placeholder="请选择" :disabled="judgeWrite('managementUnit')" clearable-->
                  <!--                           :style='{"width":"100%"}'-->
                  <!--                >-->
                  <!--                  <el-option v-for="(item, index) in managementUnitOptions" :key="index" :label="item.fullName"-->
                  <!--                             :value="item.enCode" :disabled="item.disabled"-->
                  <!--                  ></el-option>-->

                  <!--                </el-select>-->
                  <!--                <span class="value" v-if="setting.readonly">{{-->
                  <!--                    getOptionLabel(managementUnitOptions, dataForm.managementUnit) || '-'-->
                  <!--                  }}</span>-->

                  <!--              </el-form-item>-->
                  <!--            </el-col>-->

                  <el-col :span="8" v-if="judgeShow('managementUnit')">
                    <el-form-item label="管理单位" prop="managementUnit">
                      <el-input
                        v-model="item.content.managementUnit"
                        v-if="!setting.readonly"
                        placeholder="请输入"
                        :disabled="judgeWrite('managementUnit')"
                        clearable
                        :style="{ 'width': '100%' }"
                      ></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :span="14" v-if="judgeShow('notes')"
                  >
                    <el-form-item label="备注"
                                  prop="notes"
                    >
                      <el-input v-model="item.content.notes" v-if="!setting.readonly"
                                placeholder="请输入" :disabled="judgeWrite('notes')" :style='{"width":"100%"}' true
                                type="textarea" :autosize='{"minRows":4,"maxRows":4}'
                      >

                      </el-input>
                      <span class="value notes" v-if="setting.readonly">{{ item.content.notes || '-' }}</span>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-col :span="6" v-if="judgeShow('zcFile')"
                >
                  <el-form-item label="资产附件"
                                prop="zcFile"
                  >
                    <JNPF-UploadFz v-model="item.content.zcFile"
                                   :fileSize="10" :disabled="judgeWrite('zcFile')" sizeUnit="MB" :limit="9"
                                   buttonText="点击上传"
                    >

                    </JNPF-UploadFz>
                  </el-form-item>
                </el-col>
              </div>

              <div v-show="item['active'] == 1">
                <el-col :span="8" v-if="judgeShow('jnpf_zcgl_zcdj_warrant_jnpf_useNature')"
                >
                  <el-form-item label="产权类别"
                                prop="jnpf_zcgl_zcdj_warrant_jnpf_useNature"
                  >
                    <el-select v-model=" item.content.jnpf_zcgl_zcdj_warrant_jnpf_useNature" v-if="!setting.readonly"
                               placeholder="请选择" :disabled="judgeWrite('jnpf_zcgl_zcdj_warrant_jnpf_useNature')"
                               clearable :style='{"width":"100%"}'
                    >
                      <el-option v-for="(item, index) in jnpf_zcgl_zcdj_warrant_jnpf_useNatureOptions" :key="index"
                                 :label="item.fullName" :value="item.id" :disabled="item.disabled"
                      ></el-option>
                    </el-select>

                    <span class="value" v-if="setting.readonly">{{
                        getOptionLabel(jnpf_zcgl_zcdj_warrant_jnpf_useNatureOptions,  item.content.jnpf_zcgl_zcdj_warrant_jnpf_useNature) || '-'
                      }}</span>
                  </el-form-item>
                </el-col>
                <el-col :span="8" v-if="judgeShow('jnpf_zcgl_zcdj_warrant_jnpf_custodyLocation')"
                >
                  <el-form-item label="权证单位"
                                prop="jnpf_zcgl_zcdj_warrant_jnpf_custodyLocation"
                  >
                    <el-input v-model="  item.content.jnpf_zcgl_zcdj_warrant_jnpf_custodyLocation" v-if="!setting.readonly"
                              placeholder="请输入" :disabled="judgeWrite('jnpf_zcgl_zcdj_warrant_jnpf_custodyLocation')"
                              clearable :style='{"width":"100%"}'
                    >
                    </el-input>

                    <span class="value" v-if="setting.readonly">{{
                        item.content.jnpf_zcgl_zcdj_warrant_jnpf_custodyLocation || '-'
                      }}</span>

                  </el-form-item>
                </el-col>

                <el-col :span="8" v-if="judgeShow('jnpf_zcgl_zcdj_warrant_jnpf_warrantNumber')"
                >
                  <el-form-item label="产权证号"
                                prop="jnpf_zcgl_zcdj_warrant_jnpf_warrantNumber"
                  >
                    <el-input v-model=" item.content.jnpf_zcgl_zcdj_warrant_jnpf_warrantNumber" v-if="!setting.readonly"
                              placeholder="请输入" :disabled="judgeWrite('jnpf_zcgl_zcdj_warrant_jnpf_warrantNumber')"
                              clearable :style='{"width":"100%"}'
                    >
                    </el-input>

                    <span class="value" v-if="setting.readonly">{{
                        item.content.jnpf_zcgl_zcdj_warrant_jnpf_warrantNumber
                      }}</span>
                  </el-form-item>
                </el-col>
                <el-col :span="8" v-if="judgeShow('jnpf_zcgl_zcdj_warrant_jnpf_warrantType')"
                >
                  <el-form-item label="权利类型"
                                prop="jnpf_zcgl_zcdj_warrant_jnpf_warrantType"
                  >
                    <el-select v-model="  item.content.jnpf_zcgl_zcdj_warrant_jnpf_warrantType" v-if="!setting.readonly"
                               placeholder="请选择" :disabled="judgeWrite('jnpf_zcgl_zcdj_warrant_jnpf_warrantType')"
                               clearable :style='{"width":"100%"}'
                    >
                      <el-option v-for="(item, index) in jnpf_zcgl_zcdj_warrant_jnpf_warrantTypeOptions" :key="index"
                                 :label="item.fullName" :value="item.id" :disabled="item.disabled"
                      ></el-option>
                    </el-select>

                    <span class="value" v-if="setting.readonly">{{
                        getOptionLabel(jnpf_zcgl_zcdj_warrant_jnpf_warrantTypeOptions,  item.content.jnpf_zcgl_zcdj_warrant_jnpf_warrantType) || '-'
                      }}</span>
                  </el-form-item>
                </el-col>
                <el-col :span="8" v-if="judgeShow('jnpf_zcgl_zcdj_warrant_jnpf_propertyRight')"
                >
                  <el-form-item label="产权性质"
                                prop="jnpf_zcgl_zcdj_warrant_jnpf_propertyRight"
                  >
                    <el-select v-model=" item.content.jnpf_zcgl_zcdj_warrant_jnpf_propertyRight"
                               placeholder="请选择" :disabled="judgeWrite('jnpf_zcgl_zcdj_warrant_jnpf_propertyRight')"
                               clearable :style='{"width":"100%"}' v-if="!setting.readonly"
                    >
                      <el-option v-for="(item, index) in jnpf_zcgl_zcdj_warrant_jnpf_propertyRightOptions" :key="index"
                                 :label="item.fullName" :value="item.id" :disabled="item.disabled"
                      ></el-option>
                    </el-select>
                    <span class="value" v-if="setting.readonly"> {{
                        getOptionLabel(jnpf_zcgl_zcdj_warrant_jnpf_propertyRightOptions,  item.content.jnpf_zcgl_zcdj_warrant_jnpf_propertyRight) || '-'
                      }}</span>
                  </el-form-item>
                </el-col>
                <el-col :span="8" v-if="judgeShow('jnpf_zcgl_zcdj_warrant_jnpf_issuanceTime')"
                >
                  <el-form-item label="发证时间"
                                prop="jnpf_zcgl_zcdj_warrant_jnpf_issuanceTime"
                  >
                    <el-date-picker v-model="  item.content.jnpf_zcgl_zcdj_warrant_jnpf_issuanceTime" v-if="!setting.readonly"
                                    placeholder="请选择" :disabled="judgeWrite('jnpf_zcgl_zcdj_warrant_jnpf_issuanceTime')"
                                    clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd"
                    >
                    </el-date-picker>
                    <span class="value" v-if="setting.readonly">{{  item.content.jnpf_zcgl_zcdj_warrant_jnpf_issuanceTime }}</span>
                  </el-form-item>
                </el-col>
                <el-col :span="8" v-if="judgeShow('jnpf_zcgl_zcdj_warrant_jnpf_startTime')"
                >
                  <el-form-item label="开始使用时间"
                                prop="jnpf_zcgl_zcdj_warrant_jnpf_startTime"
                  >
                    <el-date-picker v-model="  item.content.jnpf_zcgl_zcdj_warrant_jnpf_startTime" v-if="!setting.readonly"
                                    placeholder="请选择" :disabled="judgeWrite('jnpf_zcgl_zcdj_warrant_jnpf_startTime')"
                                    clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd"

                    >
                    </el-date-picker>

                    <span class="value" v-if="setting.readonly">{{  item.content.jnpf_zcgl_zcdj_warrant_jnpf_startTime }}</span>
                  </el-form-item>
                </el-col>
                <el-col :span="8" v-if="judgeShow('jnpf_zcgl_zcdj_warrant_jnpf_endTime')"
                >
                  <el-form-item label="使用到期时间"
                                prop="jnpf_zcgl_zcdj_warrant_jnpf_endTime"
                  >
                    <el-date-picker v-model="  item.content.jnpf_zcgl_zcdj_warrant_jnpf_endTime" v-if="!setting.readonly"
                                    placeholder="请选择" :disabled="judgeWrite('jnpf_zcgl_zcdj_warrant_jnpf_endTime')"
                                    clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd"

                    >
                    </el-date-picker>

                    <span class="value" v-if="setting.readonly">{{item.content.jnpf_zcgl_zcdj_warrant_jnpf_endTime }}</span>
                  </el-form-item>
                </el-col>


                <el-col :span="8" v-if="judgeShow('jnpf_zcgl_zcdj_warrant_jnpf_productionFile')"
                >
                  <el-form-item label="产证附件"
                                prop="jnpf_zcgl_zcdj_warrant_jnpf_productionFile"
                  >
                    <JNPF-UploadFz v-model="  item.content.jnpf_zcgl_zcdj_warrant_jnpf_productionFile"
                                   :fileSize="10" :disabled="judgeWrite('jnpf_zcgl_zcdj_warrant_jnpf_productionFile')"
                                   sizeUnit="MB" :limit="9" buttonText="点击上传"
                    >
                    </JNPF-UploadFz>
                  </el-form-item>
                </el-col>

              </div>
              <div v-show="item['active']== 2">
                <el-col :span="8" v-if="judgeShow('jnpf_zcgl_zcdj_area_jnpf_buildingArea')"
                >
                  <el-form-item label="证载建筑面积"
                                prop="jnpf_zcgl_zcdj_area_jnpf_buildingArea"
                  >
                    <el-input-number   @change="checkArea(item.content)"   v-model="  item.content.jnpf_zcgl_zcdj_area_jnpf_buildingArea" v-if="!setting.readonly"
                                     placeholder="数字文本" :disabled="judgeWrite('jnpf_zcgl_zcdj_area_jnpf_buildingArea')"
                                     :step="1"
                    >
                    </el-input-number>

                    <span class="value" v-if="setting.readonly">{{
                        item.content.jnpf_zcgl_zcdj_area_jnpf_buildingArea || '-'
                      }}</span>
                  </el-form-item>
                </el-col>
                <el-col :span="8" v-if="judgeShow('jnpf_zcgl_zcdj_area_jnpf_landArea')"
                >
                  <el-form-item label="证载土地面积"
                                prop="jnpf_zcgl_zcdj_area_jnpf_landArea"
                  >
                    <el-input-number  @change="checkArea(item.content)"  v-model="  item.content.jnpf_zcgl_zcdj_area_jnpf_landArea" v-if="!setting.readonly"
                                     placeholder="数字文本" :disabled="judgeWrite('jnpf_zcgl_zcdj_area_jnpf_landArea')"
                                     :step="1"
                    >
                    </el-input-number>
                    <span class="value" v-if="setting.readonly">{{  item.content.jnpf_zcgl_zcdj_area_jnpf_landArea || '-' }}</span>
                  </el-form-item>
                </el-col>
                <el-col :span="8" v-if="judgeShow('jnpf_zcgl_zcdj_area_jnpf_sharedLandArea')"
                >
                  <el-form-item label="证载共有土地面积"
                                prop="jnpf_zcgl_zcdj_area_jnpf_sharedLandArea"
                  >
                    <el-input-number @change="checkArea(item.content)"  v-model="item.content.jnpf_zcgl_zcdj_area_jnpf_sharedLandArea" v-if="!setting.readonly"
                                     placeholder="数字文本"
                                     :disabled="judgeWrite('jnpf_zcgl_zcdj_area_jnpf_sharedLandArea')" :step="1"
                    >
                    </el-input-number>

                    <span class="value" v-if="setting.readonly">{{
                        item.content.jnpf_zcgl_zcdj_area_jnpf_sharedLandArea || '-'
                      }}</span>
                  </el-form-item>
                </el-col>
                <el-col :span="8" v-if="judgeShow('jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea')"
                >
                  <el-form-item label="建筑测量面积"
                                prop="jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea"
                  >
                    <el-input-number @change="checkArea(item.content)"  v-model="  item.content.jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea"
                                     v-if="!setting.readonly"
                                     placeholder="数字文本"
                                     :disabled="judgeWrite('jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea')"
                                     :step="1"
                    >
                    </el-input-number>

                    <span class="value" v-if="setting.readonly">{{
                        item.content.jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea || '-'
                      }}</span>
                  </el-form-item>
                </el-col>
<!--                <el-col :span="8" v-if="judgeShow('jnpf_zcgl_zcdj_area_jnpf_landSurveyArea')"-->
<!--                >-->
<!--                  <el-form-item label="土地测量面积"-->
<!--                                prop="jnpf_zcgl_zcdj_area_jnpf_landSurveyArea"-->
<!--                  >-->
<!--                    <el-input-number v-model="  item.content.jnpf_zcgl_zcdj_area_jnpf_landSurveyArea" v-if="!setting.readonly"-->
<!--                                     placeholder="数字文本"-->
<!--                                     :disabled="judgeWrite('jnpf_zcgl_zcdj_area_jnpf_landSurveyArea')" :step="1"-->
<!--                    >-->
<!--                    </el-input-number>-->

<!--                    <span class="value" v-if="setting.readonly">{{-->
<!--                        item.content.jnpf_zcgl_zcdj_area_jnpf_landSurveyArea || '-'-->
<!--                      }}</span>-->
<!--                  </el-form-item>-->
<!--                </el-col>-->
                <el-col :span="8" v-if="judgeShow('jnpf_zcgl_zcdj_area_jnpf_exclusiveArea')"
                >
                  <el-form-item label="独用面积"
                                prop="jnpf_zcgl_zcdj_area_jnpf_exclusiveArea"
                  >
                    <el-input-number v-model="item.content.jnpf_zcgl_zcdj_area_jnpf_exclusiveArea"  @change="checkArea(item.content)"   v-if="!setting.readonly"
                                     placeholder="数字文本" :disabled="judgeWrite('jnpf_zcgl_zcdj_area_jnpf_exclusiveArea')"
                                     :step="1"
                    >
                    </el-input-number>
                    <span class="value" v-if="setting.readonly">{{
                        item.content.jnpf_zcgl_zcdj_area_jnpf_exclusiveArea || '-'
                      }}</span>
                  </el-form-item>
                </el-col>
                <el-col :span="6" v-if="judgeShow('jnpf_zcgl_zcdj_area_jnpf_sharedArea')"
                >
                  <el-form-item label="分摊面积"
                                prop="jnpf_zcgl_zcdj_area_jnpf_sharedArea"
                  >
                    <el-input-number @change="checkArea(item.content)"  v-model="  item.content.jnpf_zcgl_zcdj_area_jnpf_sharedArea" v-if="!setting.readonly"
                                     placeholder="数字文本" :disabled="judgeWrite('jnpf_zcgl_zcdj_area_jnpf_sharedArea')"
                                     :step="1"
                    >
                    </el-input-number>
                    <span class="value" v-if="setting.readonly">{{
                        item.content.jnpf_zcgl_zcdj_area_jnpf_sharedArea || '-'
                      }}</span>
                  </el-form-item>
                </el-col>
              </div>
              <div v-show="item['active']==3">
                <el-col :span="8" v-if="judgeShow('jnpf_zcgl_zcdj_photo_jnpf_photoTime')"
                >
                  <el-form-item label="近照日期"
                                prop="jnpf_zcgl_zcdj_photo_jnpf_photoTime"
                  >
                    <el-date-picker v-model="  item.content.jnpf_zcgl_zcdj_photo_jnpf_photoTime"
                                    placeholder="请选择" :disabled="judgeWrite('jnpf_zcgl_zcdj_photo_jnpf_photoTime')"
                                    clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd"
                                    value-format="timestamp"
                    >
                    </el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="24" v-if="judgeShow('jnpf_zcgl_zcdj_photo_jnpf_photoImage')"
                >
                  <el-form-item label="近照图片"
                                prop="jnpf_zcgl_zcdj_photo_jnpf_photoImage"
                  >
                    <JNPF-UploadImg v-model="  item.content.jnpf_zcgl_zcdj_photo_jnpf_photoImage"
                                    :fileSize="10" :disabled="judgeWrite('jnpf_zcgl_zcdj_photo_jnpf_photoImage')"
                                    sizeUnit="MB" :limit="9"
                    >
                    </JNPF-UploadImg>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label-width="0">
                    <JNPF-Text :style='{"width":"100%"}'
                               :textStyle='{"color":"#CCAEAE","font-weight":"normal","text-decoration":"none","font-size":12,"line-height":32,"font-style":"normal","text-align":"left"}'
                               value="注:最多上传五张图片,单张图片最大支持10M、支持png/jpg/jpeg/gif格式" :closable="false"
                    >
                    </JNPF-Text>
                  </el-form-item>
                </el-col>
              </div>


            </el-form>
        </el-row>
      </el-tab-pane>
    </el-tabs>

    <el-dialog  @close="dialogVisible = false"  :modal-append-to-body='false' :visible="dialogVisible" title="选择位置">
      <div id="container"></div>

      <div class="info">
        <div class="input-item">
          <div class="input-item-prepend">
            <span class="input-item-text" style="width:10rem;">地址</span>
          </div>
          <el-autocomplete
            style="width: 900px"
            v-model="keywords"
            :fetch-suggestions="querySearch"
            placeholder="输入地址关键词"
            @select="selectPoi"
            clearable>
          </el-autocomplete>
        </div>


        <p><span id="input-info"></span></p>
      </div>
      <template #footer>
        <el-button @click="dialogVisible = false">取消</el-button>
        <el-button type="primary" @click="confirmSelection">确定</el-button>
      </template>
    </el-dialog>





    <!-- 固定在底部的div -->
    <div v-show="!flag" class="fixed-bottom">
      <div class="content">

        <span>可拆分证载建筑面积：{{max_jnpf_zcgl_zcdj_area_jnpf_buildingArea}}㎡</span>
        <span>可拆分证载土地面积：{{max_jnpf_zcgl_zcdj_area_jnpf_landArea }}㎡</span>
        <span>可拆分证载共有土地面积：{{max_jnpf_zcgl_zcdj_area_jnpf_sharedLandArea}}㎡</span>
        <span>可拆分建筑测量面积：{{max_jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea}}㎡</span>
<!--        <span>可拆分土地测量面积：{{max_jnpf_zcgl_zcdj_area_jnpf_landSurveyArea}}㎡</span>-->
        <span>可拆分独用面积：{{max_jnpf_zcgl_zcdj_area_jnpf_exclusiveArea}}㎡</span>
        <span>可拆分分摊面积：{{max_jnpf_jnpf_zcdj_area_jnpf_sharedArea}}㎡</span>
      </div>
    </div>
    <UserBox v-if="userBoxVisible" ref="userBox" @submit="submit"/>
  </div>
</template>
<script>
import request from '@/utils/request'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'

export default {
  components: {},
  props: [],
  data() {
    return {
      dialogVisible:false,
      editableTabsValue: 0,
      editableTabs:[],
      // editableTabs: [{
      //   title: 'Tab 122121',
      //   name: '1',
      //   content: { title: '',
      //     id: '',
      //     remarks: '',
      //     flowId: '',
      //     status: 1,
      //     freeapproveruserid: '',
      //     flowUrgent: 1,
      //     zcNumber: undefined,
      //     zcName: undefined,
      //     zcLabel: undefined,
      //     address: undefined,
      //     zcNature: undefined,
      //     zcPurpose: undefined,
      //     zcSource: undefined,
      //     affiliatedUnit: undefined,
      //     managementUnit: undefined,
      //     zcAdmin: undefined,
      //     notes: undefined,
      //     zcFmImage: [],
      //     zcFile: [],
      //     zcgl_zcdj_area:
      //       {
      //         buildingArea: '',
      //         landArea: '',
      //         sharedLandArea: '',
      //         buildingMeasurementArea: '',
      //         landSurveyArea: '',
      //         exclusiveArea: '',
      //         sharedArea: ''
      //       },
      //     zcgl_zcdj_warrant:
      //       {
      //         propertyRight: '',
      //         warrantNumber: '',
      //         landUse: '',
      //         housePurpose: '',
      //         zzPropertyOwner: '',
      //         xzPropertyOwner: '',
      //         address: '',
      //         useNature: '',
      //         buildings: '',
      //         layers: '',
      //         numberFloors: '',
      //         startTime: '',
      //         endTime: '',
      //         issuanceTime: '',
      //         custodyLocation: '',
      //         notes: '',
      //         productionFile: '',
      //         productionImage: ''
      //       },
      //     zcgl_zcdj_photo:
      //       {
      //         photoTime: '',
      //         photoImage: ''
      //       },
      //     jnpf_zcgl_zcdj_warrant_jnpf_propertyRight: '',
      //     jnpf_zcgl_zcdj_warrant_jnpf_warrantNumber: '',
      //     jnpf_zcgl_zcdj_warrant_jnpf_landUse: '',
      //     jnpf_zcgl_zcdj_warrant_jnpf_housePurpose: '',
      //     jnpf_zcgl_zcdj_warrant_jnpf_zzPropertyOwner: '',
      //     jnpf_zcgl_zcdj_warrant_jnpf_xzPropertyOwner: '',
      //     jnpf_zcgl_zcdj_warrant_jnpf_address: '',
      //     jnpf_zcgl_zcdj_warrant_jnpf_useNature: '',
      //     jnpf_zcgl_zcdj_warrant_jnpf_buildings: 0,
      //     jnpf_zcgl_zcdj_warrant_jnpf_layers: 0,
      //     jnpf_zcgl_zcdj_warrant_jnpf_numberFloors: 0,
      //     jnpf_zcgl_zcdj_warrant_jnpf_startTime: '',
      //     jnpf_zcgl_zcdj_warrant_jnpf_endTime: '',
      //     jnpf_zcgl_zcdj_warrant_jnpf_issuanceTime: '',
      //     jnpf_zcgl_zcdj_warrant_jnpf_custodyLocation: '',
      //     jnpf_zcgl_zcdj_warrant_jnpf_notes: '',
      //     jnpf_zcgl_zcdj_warrant_jnpf_productionFile: [],
      //     jnpf_zcgl_zcdj_warrant_jnpf_productionImage: [],
      //     jnpf_zcgl_zcdj_area_jnpf_buildingArea: '',
      //     jnpf_zcgl_zcdj_area_jnpf_landArea: '',
      //     jnpf_zcgl_zcdj_area_jnpf_sharedLandArea: '',
      //     jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea: '',
      //     jnpf_zcgl_zcdj_area_jnpf_landSurveyArea: '',
      //     jnpf_zcgl_zcdj_area_jnpf_exclusiveArea: '',
      //     jnpf_zcgl_zcdj_area_jnpf_sharedArea: '',
      //     jnpf_zcgl_zcdj_photo_jnpf_photoTime: '',
      //     jnpf_zcgl_zcdj_photo_jnpf_photoImage: []
      //   }
      // }],
      // tabIndex: 2,
      flag:false,
      assetClassOptions: [],

      max_jnpf_zcgl_zcdj_area_jnpf_buildingArea:0,
      max_jnpf_zcgl_zcdj_area_jnpf_landArea:0,
      max_jnpf_zcgl_zcdj_area_jnpf_sharedLandArea:0,
      max_jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea:0,
      max_jnpf_zcgl_zcdj_area_jnpf_landSurveyArea:0,
      max_jnpf_zcgl_zcdj_area_jnpf_exclusiveArea:0,
      max_jnpf_jnpf_zcdj_area_jnpf_sharedArea:0,

      old_max_jnpf_zcgl_zcdj_area_jnpf_buildingArea:0,
      old_max_jnpf_zcgl_zcdj_area_jnpf_landArea:0,
      old_max_jnpf_zcgl_zcdj_area_jnpf_sharedLandArea:0,
      old_max_jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea:0,
      old_max_jnpf_zcgl_zcdj_area_jnpf_landSurveyArea:0,
      old_max_jnpf_zcgl_zcdj_area_jnpf_exclusiveArea:0,
      old_max_jnpf_jnpf_zcdj_area_jnpf_sharedArea:0,
      active: 0,
      visible: false,
      loading: false,
      setting: {},
      eventType: '',
      userBoxVisible: false,
      currTableConf: {},
      addTableConf: {},
      tableRows: {},
      dataForm: {
        newData:[]

      },
      a:{ title: '',
        id: '',
        remarks: '',
        flowId: '',
        status: 1,
        freeapproveruserid: '',
        flowUrgent: 1,
        zcNumber: undefined,
        zcName: undefined,
        zcLabel: undefined,
        address: undefined,
        zcNature: undefined,
        zcPurpose: undefined,
        zcSource: undefined,
        affiliatedUnit: undefined,
        managementUnit: undefined,
        zcAdmin: undefined,
        notes: undefined,
        zcFmImage: [],
        zcFile: [],
        zcgl_zcdj_area:
          {
            buildingArea: '',
            landArea: '',
            sharedLandArea: '',
            buildingMeasurementArea: '',
            landSurveyArea: '',
            exclusiveArea: '',
            sharedArea: ''
          },
        zcgl_zcdj_warrant:
          {
            propertyRight: '',
            warrantNumber: '',
            landUse: '',
            housePurpose: '',
            zzPropertyOwner: '',
            xzPropertyOwner: '',
            address: '',
            useNature: '',
            buildings: '',
            layers: '',
            numberFloors: '',
            startTime: '',
            endTime: '',
            issuanceTime: '',
            custodyLocation: '',
            notes: '',
            productionFile: '',
            productionImage: ''
          },
        zcgl_zcdj_photo:
          {
            photoTime: '',
            photoImage: ''
          },
        jnpf_zcgl_zcdj_warrant_jnpf_propertyRight: '',
        jnpf_zcgl_zcdj_warrant_jnpf_warrantNumber: '',
        jnpf_zcgl_zcdj_warrant_jnpf_landUse: '',
        jnpf_zcgl_zcdj_warrant_jnpf_housePurpose: '',
        jnpf_zcgl_zcdj_warrant_jnpf_zzPropertyOwner: '',
        jnpf_zcgl_zcdj_warrant_jnpf_xzPropertyOwner: '',
        jnpf_zcgl_zcdj_warrant_jnpf_address: '',
        jnpf_zcgl_zcdj_warrant_jnpf_useNature: '',
        jnpf_zcgl_zcdj_warrant_jnpf_buildings: 0,
        jnpf_zcgl_zcdj_warrant_jnpf_layers: 0,
        jnpf_zcgl_zcdj_warrant_jnpf_numberFloors: 0,
        jnpf_zcgl_zcdj_warrant_jnpf_startTime: '',
        jnpf_zcgl_zcdj_warrant_jnpf_endTime: '',
        jnpf_zcgl_zcdj_warrant_jnpf_issuanceTime: '',
        jnpf_zcgl_zcdj_warrant_jnpf_custodyLocation: '',
        jnpf_zcgl_zcdj_warrant_jnpf_notes: '',
        jnpf_zcgl_zcdj_warrant_jnpf_productionFile: [],
        jnpf_zcgl_zcdj_warrant_jnpf_productionImage: [],
        jnpf_zcgl_zcdj_area_jnpf_buildingArea: '',
        jnpf_zcgl_zcdj_area_jnpf_landArea: '',
        jnpf_zcgl_zcdj_area_jnpf_sharedLandArea: '',
        jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea: '',
        jnpf_zcgl_zcdj_area_jnpf_landSurveyArea: '',
        jnpf_zcgl_zcdj_area_jnpf_exclusiveArea: '',
        jnpf_zcgl_zcdj_area_jnpf_sharedArea: '',
        jnpf_zcgl_zcdj_photo_jnpf_photoTime: '',
        jnpf_zcgl_zcdj_photo_jnpf_photoImage: []
      },
      tableRequiredData: {},
      activeremygj: '2',
      dataRule:
        {


        },
      zcNatureOptions: [],
      zcPurposeOptions: [],
      zcSourceOptions: [],
      affiliatedUnitOptions: [],
      managementUnitOptions: [],
      zcStatusOptions: [],

      jnpf_zcgl_zcdj_warrant_jnpf_propertyRightOptions: [],
      jnpf_zcgl_zcdj_warrant_jnpf_warrantTypeOptions: [],
      jnpf_zcgl_zcdj_warrant_jnpf_useNatureOptions: []
    }
  },
  computed: {
    formOperates() {
      return this.setting.formOperates
    }
  },
  watch: {},
  created() {
    this.getzcStatus()
    this.getassetClassOptions()
    this.getzcPurposeOptions()
    this.getzcSourceOptions()
    this.getaffiliatedUnitOptions()
    this.getmanagementUnitOptions()
    this.getjnpf_zcgl_zcdj_warrant_jnpf_propertyRightOptions()
    this.getjnpf_zcgl_zcdj_warrant_jnpf_useNatureOptions()


  },
  mounted() {
  },
  methods: {
    // label: `${item.name} - ${item.district || ''} - ${item.address || ''}`,
    querySearch(queryString, cb) {
      this.keywords = queryString;
      this.autoInput();
      this.searchResults = this.searchResults
        .filter(item => item.location && item.name)
        .map(item => ({
          ...item,
          address: item.address || `${item.district || ''}${item.name || ''}`,
          fullText: item.address || `${item.district || ''}${item.name || ''}`,
          // 为了符合 el-autocomplete 的格式要求，添加 label 和 value 属性
          label: item.address || `${item.district || ''}${item.name || ''}`,
          value: item.address
        }));
      cb(this.searchResults);
    },
    initMap() {
      this.map = new AMap.Map('container', {
        resizeEnable: true,
        zoom: 11
      });
      this.autoCompleteDom = new AMap.Autocomplete({
        city: '全国'
      });

      // 添加地图点击事件监听器
      this.map.on('click', (e) => {
        const lng = e.lnglat.getLng();
        const lat = e.lnglat.getLat();

        // 使用逆地理编码将坐标转换为地址
        const geocoder = new AMap.Geocoder({
          radius: 1000,
          extensions: 'all'
        });
        geocoder.getAddress([lng, lat], (status, result) => {
          if (status === 'complete' && result.info === 'OK') {
            const address = result.regeocode.formattedAddress;
            this.dataForm.address = address;
            this.keywords = address

            this.selectedLocation = {
              lng: lng,
              lat: lat,
              address: address
            };
            console.log('更新后的地址:', address);

            // 添加标记
            if (this.marker) {
              this.marker.setMap(null);
            }
            this.marker = new AMap.Marker({
              position: [lng, lat],
              map: this.map
            });

            // 定位到所选位置并设置地图视野
            this.map.setCenter([lng, lat]);
            this.map.setZoom(15);
          }
        });
      });
    },
    autoInput() {

      // 1. 确保AMap已加载
      if (!this.map) {
        console.error('AMap未加载');
        return;
      }
      if (!this.autoCompleteDom) {
        console.error('AMapautoCompleteDom未加载');
        return;
      }

      // 2. 如果关键字为空则清空结果
      if (!this.keywords.trim()) {
        this.searchResults = [];
        return;
      }

      // 3. 使用Promise确保插件加载完成
      console.log('autoComplete, result', this.autoCompleteDom)
      //   // 5. 执行搜索
      //   this.autoCompleteDom.search(this.keywords, (status, result) => {
      //       console.log('status',status, result)
      //       if (status === 'complete' && result.info === 'OK') {
      //         // 6. 过滤有效结果并格式化
      //         this.searchResults = result.tips
      //           .filter(item => item.location && item.name)
      //           .map(item => ({
      //             ...item,
      //             // 确保有完整的地址信息
      //             address: item.address || `${item.district || ''}${item.name || ''}`,
      //             // 用于el-option显示的完整文本
      //             fullText: `${item.name} - ${item.district || ''} - ${item.address || ''}`
      //           }));
      //         console.log('this.searchResults',this.searchResults)
      //       } else {
      //         this.searchResults = [];
      //       }
      // })
      // 5. 执行搜索
      this.autoCompleteDom.search(this.keywords, (status, result) => {
        console.log('status', status, result);
        if (status === 'complete' && result.info === 'OK') {
          // 6. 过滤有效结果并格式化
          this.searchResults = result.tips
            .filter(item => item.location && item.name)
            .map(item => ({
              ...item,
              // 确保有完整的地址信息
              address: item.address || `${item.district || ''}${item.name || ''}`,
              // 用于 el-option 显示的完整文本
              fullText: `${item.name} - ${item.district || ''} - ${item.address || ''}`
            }));
          console.log('this.searchResults', this.searchResults);
        } else {
          this.searchResults = [];
        }
      });
    },

    selectPoi(poi) {
      // 7. 处理选中的POI
      console.log('poi', poi);
      if (poi && poi.location) {
        this.selectedLocation = {
          lng: poi.location.lng,
          lat: poi.location.lat,
          address: poi.fullText || `${poi.name} - ${poi.district || ''} - ${poi.address || ''}`
        };

        // 添加标记
        if (this.map) {
          // 清除之前的标记
          if (this.marker) {
            this.marker.setMap(null);
          }

          // 创建新的标记
          this.marker = new AMap.Marker({
            position: [poi.location.lng, poi.location.lat],
            map: this.map
          });

          // 定位到所选位置并设置地图视野
          this.map.setCenter([poi.location.lng, poi.location.lat]);
          this.map.setZoom(15);
        }
      }
    },

    confirmSelection() {
      // 8. 确认选择
      if (this.selectedLocation) {
        // this.$emit('location-selected', this.selectedLocation);
        this.dataForm.address = this.selectedLocation.address
        this.dataForm.longitude = this.selectedLocation.lng
        this.dataForm.latitude = this.selectedLocation.lat
        this.dialogVisible = false;
      } else {
        this.$message.warning('请先选择一个位置');
      }
    },
    openDialog() {
      this.dialogVisible = true;
      this.$nextTick(() => {
        this.initMap();
      });
    },
    addTab() {
      // 1. 确保editableTabsValue是数字类型
      const currentTabIndex = Number(this.editableTabsValue);
      const newTabIndex = currentTabIndex + 1;
      this.updateDataRule()

      // 2. 创建新的标签页数据
      const newTab = {
        title: `资产${newTabIndex}`,
        name: String(newTabIndex), // 统一使用字符串类型
        active: 0,
        dataRule:this.dataRule,
        content: this.getDefaultFormData() // 使用单独的方法初始化表单数据
      };

      // 3. 添加到editableTabs数组
      this.editableTabs.push(newTab);

      // 4. 更新当前激活的标签页为新创建的标签页
      this.editableTabsValue = String(newTabIndex);

      // 5. 等待DOM更新后重置表单
      this.$nextTick(() => {
        const formRef = this.$refs[`elForm${newTabIndex}`];

        // 调试信息
        console.log('Current editableTabsValue:', this.editableTabsValue);
        console.log('Form ref:', formRef);

        if (Array.isArray(formRef) && formRef[0] && formRef[0].resetFields) {
          formRef[0].resetFields();
        } else if (formRef && formRef.resetFields) {
          // 如果不是数组，直接调用
          formRef.resetFields();
        } else {
          console.error('无法找到表单引用或resetFields方法不存在');
        }
      });

      this.$forceUpdate()
    },

// 单独提取的默认表单数据初始化方法
    getDefaultFormData() {
      return {
        assetClass:"",
        acquisitionDate: "",
        belongingProject: "",
        acquiringValue: "",
        valuationNow: "",
        zcStatus: "",
        title: "",
        id: '',
        flowId: '',
        belongingBuilding:"",
        status: 1,
        freeapproveruserid: '',
        flowUrgent: 1,
        zcNumber: "",
        zcName: "",
        zcLabel: "",
        address: "",
        zcNature: "",
        zcPurpose: "",
        zcSource: "",
        affiliatedUnit: "",
        managementUnit: "",
        zcAdmin: "",
        notes: "",
        zcFmImage: [],
        zcFile: [],
        zcgl_zcdj_area: {
          buildingArea: '',
          landArea: '',
          sharedLandArea: '',
          buildingMeasurementArea: '',
          landSurveyArea: '',
          exclusiveArea: '',
          sharedArea: ''
        },
        zcgl_zcdj_warrant: {
          propertyRight: '',
          warrantNumber: '',
          landUse: '',
          housePurpose: '',
          zzPropertyOwner: '',
          xzPropertyOwner: '',
          address: '',
          useNature: '',
          buildings: '',
          layers: '',
          numberFloors: '',
          startTime: '',
          endTime: '',
          issuanceTime: '',
          custodyLocation: '',
          notes: '',
          productionFile: '',
          productionImage: ''
        },
        zcgl_zcdj_photo: {
          photoTime: '',
          photoImage: ''
        },
        // 其他字段...
        jnpf_zcgl_zcdj_warrant_jnpf_propertyRight: '',
        jnpf_zcgl_zcdj_warrant_jnpf_warrantNumber: '',
        jnpf_zcgl_zcdj_warrant_jnpf_landUse: '',
        jnpf_zcgl_zcdj_warrant_jnpf_housePurpose: '',
        jnpf_zcgl_zcdj_warrant_jnpf_zzPropertyOwner: '',
        jnpf_zcgl_zcdj_warrant_jnpf_xzPropertyOwner: '',
        jnpf_zcgl_zcdj_warrant_jnpf_address: '',
        jnpf_zcgl_zcdj_warrant_jnpf_useNature: '',
        jnpf_zcgl_zcdj_warrant_jnpf_buildings: 0,
        jnpf_zcgl_zcdj_warrant_jnpf_layers: 0,
        jnpf_zcgl_zcdj_warrant_jnpf_numberFloors: 0,
        jnpf_zcgl_zcdj_warrant_jnpf_startTime: '',
        jnpf_zcgl_zcdj_warrant_jnpf_endTime: '',
        jnpf_zcgl_zcdj_warrant_jnpf_issuanceTime: '',
        jnpf_zcgl_zcdj_warrant_jnpf_custodyLocation: '',
        jnpf_zcgl_zcdj_warrant_jnpf_notes: '',
        jnpf_zcgl_zcdj_warrant_jnpf_productionFile: [],
        jnpf_zcgl_zcdj_warrant_jnpf_productionImage: [],
        jnpf_zcgl_zcdj_area_jnpf_buildingArea: '',
        jnpf_zcgl_zcdj_area_jnpf_landArea: '',
        jnpf_zcgl_zcdj_area_jnpf_sharedLandArea: '',
        jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea: '',
        jnpf_zcgl_zcdj_area_jnpf_landSurveyArea: '',
        jnpf_zcgl_zcdj_area_jnpf_exclusiveArea: '',
        jnpf_zcgl_zcdj_area_jnpf_sharedArea: '',
        jnpf_zcgl_zcdj_photo_jnpf_photoTime: '',
        jnpf_zcgl_zcdj_photo_jnpf_photoImage: []
        // 剩余字段初始化...
      };
    },
    // addTab() {
    //   this.editableTabs.push({
    //     title: '资产'+this.editableTabsValue.toString(),
    //     name: this.editableTabsValue,
    //     active:0,
    //     content: { title: '',
    //       id: '',
    //       remarks: '',
    //       flowId: '',
    //       status: 1,
    //       freeapproveruserid: '',
    //       flowUrgent: 1,
    //       zcNumber: undefined,
    //       zcName: undefined,
    //       zcLabel: undefined,
    //       address: undefined,
    //       zcNature: undefined,
    //       zcPurpose: undefined,
    //       zcSource: undefined,
    //       affiliatedUnit: undefined,
    //       managementUnit: undefined,
    //       zcAdmin: undefined,
    //       notes: undefined,
    //       zcFmImage: [],
    //       assetClassOptions: [],
    //       zcFile: [],
    //       zcgl_zcdj_area:
    //         {
    //           buildingArea: '',
    //           landArea: '',
    //           sharedLandArea: '',
    //           buildingMeasurementArea: '',
    //           landSurveyArea: '',
    //           exclusiveArea: '',
    //           sharedArea: ''
    //         },
    //       zcgl_zcdj_warrant:
    //         {
    //           propertyRight: '',
    //           warrantNumber: '',
    //           landUse: '',
    //           housePurpose: '',
    //           zzPropertyOwner: '',
    //           xzPropertyOwner: '',
    //           address: '',
    //           useNature: '',
    //           buildings: '',
    //           layers: '',
    //           numberFloors: '',
    //           startTime: '',
    //           endTime: '',
    //           issuanceTime: '',
    //           custodyLocation: '',
    //           notes: '',
    //           productionFile: '',
    //           productionImage: ''
    //         },
    //       zcgl_zcdj_photo:
    //         {
    //           photoTime: '',
    //           photoImage: ''
    //         },
    //       jnpf_zcgl_zcdj_warrant_jnpf_propertyRight: '',
    //       jnpf_zcgl_zcdj_warrant_jnpf_warrantNumber: '',
    //       jnpf_zcgl_zcdj_warrant_jnpf_landUse: '',
    //       jnpf_zcgl_zcdj_warrant_jnpf_housePurpose: '',
    //       jnpf_zcgl_zcdj_warrant_jnpf_zzPropertyOwner: '',
    //       jnpf_zcgl_zcdj_warrant_jnpf_xzPropertyOwner: '',
    //       jnpf_zcgl_zcdj_warrant_jnpf_address: '',
    //       jnpf_zcgl_zcdj_warrant_jnpf_useNature: '',
    //       jnpf_zcgl_zcdj_warrant_jnpf_buildings: 0,
    //       jnpf_zcgl_zcdj_warrant_jnpf_layers: 0,
    //       jnpf_zcgl_zcdj_warrant_jnpf_numberFloors: 0,
    //       jnpf_zcgl_zcdj_warrant_jnpf_startTime: '',
    //       jnpf_zcgl_zcdj_warrant_jnpf_endTime: '',
    //       jnpf_zcgl_zcdj_warrant_jnpf_issuanceTime: '',
    //       jnpf_zcgl_zcdj_warrant_jnpf_custodyLocation: '',
    //       jnpf_zcgl_zcdj_warrant_jnpf_notes: '',
    //       jnpf_zcgl_zcdj_warrant_jnpf_productionFile: [],
    //       jnpf_zcgl_zcdj_warrant_jnpf_productionImage: [],
    //       jnpf_zcgl_zcdj_area_jnpf_buildingArea: '',
    //       jnpf_zcgl_zcdj_area_jnpf_landArea: '',
    //       jnpf_zcgl_zcdj_area_jnpf_sharedLandArea: '',
    //       jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea: '',
    //       jnpf_zcgl_zcdj_area_jnpf_landSurveyArea: '',
    //       jnpf_zcgl_zcdj_area_jnpf_exclusiveArea: '',
    //       jnpf_zcgl_zcdj_area_jnpf_sharedArea: '',
    //       jnpf_zcgl_zcdj_photo_jnpf_photoTime: '',
    //       jnpf_zcgl_zcdj_photo_jnpf_photoImage: []
    //     }
    //   });
    //
    //
    //   this.$nextTick(() => {
    //     const formRef = this.$refs[`elForm${this.editableTabsValue}`];
    //     alert(formRef)
    //     alert(formRef[0])
    //     formRef[0].resetFields();
    //     alert( this.editableTabsValue)
    //     this.editableTabsValue  = this.editableTabsValue + 1
    //     alert( this.editableTabsValue)
    //
    //   });
    //
    // },
    checkArea(item){
      var  buildingAreaS = 0
      var  landAreaS = 0
      var  sharedLandAreaS = 0
      var  buildingMeasurementAreaS = 0
      var  exclusiveAreas = 0
      var  sharedAreas = 0
      this.max_jnpf_zcgl_zcdj_area_jnpf_buildingArea = this.old_max_jnpf_zcgl_zcdj_area_jnpf_buildingArea
        this.max_jnpf_zcgl_zcdj_area_jnpf_landArea = this.old_max_jnpf_zcgl_zcdj_area_jnpf_landArea
        this.max_jnpf_zcgl_zcdj_area_jnpf_sharedLandArea = this.old_max_jnpf_zcgl_zcdj_area_jnpf_sharedLandArea
        this.max_jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea= this.old_max_jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea
        this.max_jnpf_zcgl_zcdj_area_jnpf_exclusiveArea= this.old_max_jnpf_zcgl_zcdj_area_jnpf_exclusiveArea
        this.max_jnpf_jnpf_zcdj_area_jnpf_sharedArea= this.old_max_jnpf_jnpf_zcdj_area_jnpf_sharedArea

      for (let i = 0; i < this.editableTabs.length; i++) {
        var jnpf_zcgl_zcdj_area_jnpf_buildingArea = this.editableTabs[i].content.jnpf_zcgl_zcdj_area_jnpf_buildingArea
        var jnpf_zcgl_zcdj_area_jnpf_landArea = this.editableTabs[i].content.jnpf_zcgl_zcdj_area_jnpf_landArea
        var jnpf_zcgl_zcdj_area_jnpf_sharedLandArea = this.editableTabs[i].content.jnpf_zcgl_zcdj_area_jnpf_sharedLandArea
        var jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea = this.editableTabs[i].content.jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea
        var jnpf_zcgl_zcdj_area_jnpf_exclusiveArea = this.editableTabs[i].content.jnpf_zcgl_zcdj_area_jnpf_exclusiveArea
        var jnpf_zcdj_area_jnpf_sharedArea = this.editableTabs[i].content.jnpf_zcgl_zcdj_area_jnpf_sharedArea
        buildingAreaS = buildingAreaS+jnpf_zcgl_zcdj_area_jnpf_buildingArea
        landAreaS = landAreaS + jnpf_zcgl_zcdj_area_jnpf_landArea
        sharedLandAreaS = sharedLandAreaS + jnpf_zcgl_zcdj_area_jnpf_sharedLandArea
        buildingMeasurementAreaS = buildingMeasurementAreaS + jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea
        exclusiveAreas = exclusiveAreas + jnpf_zcgl_zcdj_area_jnpf_exclusiveArea
        sharedAreas = sharedAreas + jnpf_zcdj_area_jnpf_sharedArea
      }

        this.max_jnpf_zcgl_zcdj_area_jnpf_buildingArea = this.max_jnpf_zcgl_zcdj_area_jnpf_buildingArea - buildingAreaS
        this.max_jnpf_zcgl_zcdj_area_jnpf_landArea = this.max_jnpf_zcgl_zcdj_area_jnpf_landArea - landAreaS
        this.max_jnpf_zcgl_zcdj_area_jnpf_sharedLandArea = this.max_jnpf_zcgl_zcdj_area_jnpf_sharedLandArea - sharedLandAreaS
        this.max_jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea = this.max_jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea - buildingMeasurementAreaS
        this.max_jnpf_zcgl_zcdj_area_jnpf_exclusiveArea = this.max_jnpf_zcgl_zcdj_area_jnpf_exclusiveArea - exclusiveAreas
        this.max_jnpf_jnpf_zcdj_area_jnpf_sharedArea = this.max_jnpf_jnpf_zcdj_area_jnpf_sharedArea - sharedAreas
        if(this.max_jnpf_zcgl_zcdj_area_jnpf_buildingArea<0){
          // item.jnpf_zcgl_zcdj_area_jnpf_buildingArea = 0
          this.max_jnpf_zcgl_zcdj_area_jnpf_buildingArea = this.old_max_jnpf_zcgl_zcdj_area_jnpf_buildingArea
          this.$message({
            message:"拆分面积之和不能大于父体证载建筑面积",
            type: 'error',
            duration: 1000
          })
          return
        }
        if(this.max_jnpf_zcgl_zcdj_area_jnpf_landArea<0){
          // item.jnpf_zcgl_zcdj_area_jnpf_landArea = 0
          this.max_jnpf_zcgl_zcdj_area_jnpf_landArea = this.old_max_jnpf_zcgl_zcdj_area_jnpf_landArea
          this.$message({
            message:"拆分面积之和不能大于证载土地面积",
            type: 'error',
            duration: 1000
          })
          return
        }
        if(this.max_jnpf_zcgl_zcdj_area_jnpf_sharedLandArea<0){
          // item.jnpf_zcgl_zcdj_area_jnpf_sharedLandArea = 0
          this.max_jnpf_zcgl_zcdj_area_jnpf_sharedLandArea = this.old_max_jnpf_zcgl_zcdj_area_jnpf_sharedLandArea
          this.$message({
            message:"拆分面积之和不能大于证载共有土地面积",
            type: 'error',
            duration: 1000
          })
          return
        }

        if(this.max_jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea<0){
          // item.jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea = 0
          this.max_jnpf_zcgl_zcdj_area_jnpf_sharedLandArea = this.old_max_jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea
          this.$message({
            message:"拆分面积之和不能大于建筑测量面积",
            type: 'error',
            duration: 1000
          })
          return
        }

        if(this.max_jnpf_zcgl_zcdj_area_jnpf_exclusiveArea<0){
          // item.jnpf_zcgl_zcdj_area_jnpf_exclusiveArea = 0
          this.max_jnpf_zcgl_zcdj_area_jnpf_sharedLandArea = this.old_max_jnpf_zcgl_zcdj_area_jnpf_exclusiveArea
          this.$message({
            message:"拆分面积之和不能大于建筑套内面积",
            type: 'error',
            duration: 1000
          })
          return
        }
        if(this.max_jnpf_jnpf_zcdj_area_jnpf_sharedArea<0){
          // item.jnpf_zcgl_zcdj_area_jnpf_sharedArea = 0
          this.max_jnpf_jnpf_zcdj_area_jnpf_sharedArea = this.old_max_jnpf_jnpf_zcdj_area_jnpf_sharedArea
          this.$message({
            message:"拆分面积之和不能大于建筑分摊面积",
            type: 'error',
            duration: 1000
          })
          this.$forceUpdate()
          return
        // }
      }
    },

    removeTab(targetName) {

      if(this.setting.readonly){


        return
      }

      let tabs = this.editableTabs;
      let activeName = this.editableTabsValue;
      if (activeName === targetName) {
        tabs.forEach((tab, index) => {
          if (tab.name === targetName) {
            let nextTab = tabs[index + 1] || tabs[index - 1];
            if (nextTab) {
              activeName = nextTab.name;
            }
          }
        });
      }

      this.editableTabsValue = activeName;
      this.editableTabs = tabs.filter(tab => tab.name !== targetName);
    },
    // 获取选项标签
    getOptionLabel(options, value) {
      const item = options.find(opt => opt.id === value);
      return item ? item.fullName : '';
    },
    getzcStatus() {
      getDictionaryDataSelector('610000000000000000').then(res => {
        this.zcStatusOptions = res.data.list
      })
    },
    getassetClassOptions() {
      getDictionaryDataSelector('610000000000000001').then(res => {
        this.assetClassOptions = res.data.list
      })
    },
    check(type,value){
      if(!flag){

        if(type == 1){
          if(value>this.max_jnpf_zcgl_zcdj_area_jnpf_buildingArea){
            this.$message({
              message:"拆分面积不能大于父体证载建筑面积",
              type: 'error',
              duration: 1000
            })
            this.dataForm.jnpf_zcgl_zcdj_area_jnpf_buildingArea = ''
          }
        }

        if(type == 2){
          if(value>this.max_jnpf_zcgl_zcdj_area_jnpf_landArea){
            this.$message({
              message:"拆分面积不能大于父体证载土地面积",
              type: 'error',
              duration: 1000
            })
            this.dataForm.jnpf_zcgl_zcdj_area_jnpf_landArea = ''
          }
        }
        if(type == 3){
          if(value>this.max_jnpf_zcgl_zcdj_area_jnpf_sharedLandArea){
            this.$message({
              message:"拆分面积不能大于证载共有土地面积",
              type: 'error',
              duration: 1000
            })
            this.dataForm.jnpf_zcgl_zcdj_area_jnpf_sharedLandArea = ''
          }
        }

        if(type == 4){
          if(value>this.max_jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea){
            this.$message({
              message:"拆分面积不能大于建筑测量面积",
              type: 'error',
              duration: 1000
            })
            this.dataForm.jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea = ''
          }
        }
        if(type == 5){
          if(value>this.max_jnpf_zcgl_zcdj_area_jnpf_landSurveyArea){
            this.$message({
              message:"拆分面积不能大于土地测量面积",
              type: 'error',
              duration: 1000
            })
            this.dataForm.jnpf_zcgl_zcdj_area_jnpf_landSurveyArea = ''
          }
        }
        if(type == 6){
          if(value>this.max_jnpf_zcgl_zcdj_area_jnpf_exclusiveArea){
            this.$message({
              message:"拆分面积不能大于独用面积",
              type: 'error',
              duration: 1000
            })
            this.dataForm.jnpf_zcgl_zcdj_area_jnpf_exclusiveArea = ''
          }
        }

        if(type == 7){
          if(value>this.max_jnpf_jnpf_zcdj_area_jnpf_sharedArea){
            this.$message({
              message:"拆分面积不能大于分摊面积",
              type: 'error',
              duration: 1000
            })
            this.dataForm.jnpf_zcgl_zcdj_area_jnpf_sharedArea = ''
          }
        }
      }

    },

    validateRequiredFields(dataForm, fields, content) {
      if (!dataForm[fields] || dataForm[fields] === '') {

        this.$message({
          message: `请填写${content}`,
          type: 'error',
          duration: 1000
        })
        return false
      }
    },

    nextS(item) {

      if (item.active-- < 1) item.active = 0
    },

    next(item) {
      // //校验必填值
      // if (item.active == 0) {
      //   if (this.validateRequiredFields(this.dataForm, 'zcName', '资产名称') == false) {
      //     return
      //   }
      //   if (this.validateRequiredFields(this.dataForm, 'address', '资产地址') == false) {
      //     return
      //   }
      //
      //   if (this.validateRequiredFields(this.dataForm, 'zcSource', '资产来源') == false) {
      //     return
      //   }
      //   if (this.validateRequiredFields(this.dataForm, 'affiliatedUnit', 'affiliatedUnit') == false) {
      //     return
      //   }
      //   if (this.validateRequiredFields(this.dataForm, 'managementUnit', '管理单位') == false) {
      //     return
      //   }
      // }
      //
      // if (item.active == 1) {
      //   if (this.validateRequiredFields(this.dataForm, 'jnpf_zcgl_zcdj_warrant_jnpf_propertyRight', '产权性质') == false) {
      //     return
      //   }
      //   if (this.validateRequiredFields(this.dataForm, 'jnpf_zcgl_zcdj_warrant_jnpf_startTime', '开始使用时间') == false) {
      //     return
      //   }
      //   if (this.validateRequiredFields(this.dataForm, 'jnpf_zcgl_zcdj_warrant_jnpf_endTime', '结束使用时间') == false) {
      //     return
      //   }
      //
      // }
      //
      // if (item.active == 2) {
      //   if (this.validateRequiredFields(this.dataForm, 'jnpf_zcgl_zcdj_area_jnpf_sharedLandArea', '证载共有土地面积') == false) {
      //     return
      //   }
      //   if (this.validateRequiredFields(this.dataForm, 'jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea', '建筑测量面积') == false) {
      //     return
      //   }
      //
      //
      // }


      if (item.active++ > 2) item.active = 0
    },
    judgeShow(id) {
      if (!this.setting.formOperates || !this.setting.formOperates.length) return true
      let arr = this.setting.formOperates.filter(o => o.id === id) || []
      if (!arr.length) return true
      let item = arr[0]
      return item.read
    },
    judgeWrite(id) {
      if (!this.setting.formOperates || !this.setting.formOperates.length) return false
      let arr = this.setting.formOperates.filter(o => o.id === id) || []
      if (!arr.length) return true
      let item = arr[0]
      return !item.write
    },
    getzcNatureOptions() {
      getDictionaryDataSelector('610823452110094661').then(res => {
        this.zcNatureOptions = res.data.list
      })
    },
    getzcPurposeOptions() {
      getDictionaryDataSelector('610823865056100677').then(res => {
        this.zcPurposeOptions = res.data.list
      })
    },
    getzcSourceOptions() {
      getDictionaryDataSelector('610823965094445381').then(res => {
        this.zcSourceOptions = res.data.list
      })
    },
    getaffiliatedUnitOptions() {
      getDictionaryDataSelector('610824055188095301').then(res => {
        this.affiliatedUnitOptions = res.data.list
      })
    },
    getmanagementUnitOptions() {
      getDictionaryDataSelector('610824142995849541').then(res => {
        this.managementUnitOptions = res.data.list
      })
    },
    getjnpf_zcgl_zcdj_warrant_jnpf_propertyRightOptions() {
      getDictionaryDataSelector('610826202277478725').then(res => {
        this.jnpf_zcgl_zcdj_warrant_jnpf_propertyRightOptions = res.data.list
      })
    },
    getjnpf_zcgl_zcdj_warrant_jnpf_useNatureOptions() {
      getDictionaryDataSelector('610826295164535109').then(res => {
        this.jnpf_zcgl_zcdj_warrant_jnpf_useNatureOptions = res.data.list
      })
    },
    goBack() {
      this.$emit('refresh')
    },
    init(data) {
      this.dataForm.id = data.id || ''
      this.setting = data
      this.visible = true
      this.updateDataRule()

      if (data.flowTaskInfo != null) {
        this.flag = true
        console.log(data.flowTaskInfo)

        this.dataInfo3(data.flowTaskInfo.flowFormContentJson)
        this.$emit('setPageLoad')
        this.$store.commit('generator/UPDATE_RELATION_DATA', {})
        this.loading = false
        // this.dataForm.id = data.id || "";
        this.setting = data
        if (data.flowTaskInfo != null) {

          this.setting['readonly'] = true

        }

        // this.visible = true;
        this.updateDataRule()
        this.$forceUpdate()

      }else{
        this.addTab()
        this.$nextTick(() => {
          // this.$refs['elForm1'].resetFields()
          if (this.dataForm.id) {

            this.loading = true
            request({
              url: '/api/example/ZcglZcdjInfo/' + this.dataForm.id,
              method: 'get'
            }).then(res => {

              this.dataInfo(res.data)
              this.loading = false
            })
          }
          this.$emit('setPageLoad')
        })
      }


      this.$store.commit('generator/UPDATE_RELATION_DATA', {})
    },
    updateDataRule() {
      let newRules = {}
      for (let i = 0; i < this.setting.formOperates.length; i++) {
        const item = this.setting.formOperates[i]
        if (!item.id.includes('-')) {
          const newRulesItem = {
            required: item.required,
            message: item.name + '不能为空',
            trigger: item.trigger || 'blur'
          }
          if (!this.dataRule.hasOwnProperty(item.id)) {
            if (item.required) this.$set(newRules, item.id, [newRulesItem])
          } else {
            let withoutRequiredItem = true
            for (let i = 0; i < this.dataRule[item.id].length; i++) {
              if (this.dataRule[item.id][i].hasOwnProperty('required')) {
                this.dataRule[item.id][i].required = item.required
                withoutRequiredItem = false
              }
            }
            if (withoutRequiredItem && item.required) this.dataRule[item.id].push(newRulesItem)
          }
        } else {
          let key = item.id.split('-')[0]
          let newId = item.id.split('-')[1]
          let newItem = {
            ...item,
            id: newId
          }
          if (!this.tableRequiredData.hasOwnProperty(key)) {
            this.$set(this.tableRequiredData, key, [newItem])
          } else {
            this.tableRequiredData[key].push(newItem)
          }
        }
      }
      this.dataRule = { ...this.dataRule, ...newRules }
    },
    exist() {
      let isOk = true
      for (let key in this.tableRequiredData) {
        if (this.dataForm[key] && Array.isArray(this.dataForm[key])) {
          for (let i = 0; i < this.dataForm[key].length; i++) {
            let item = this.dataForm[key][i]
            inner: for (let id in item) {
              let arr = this.tableRequiredData[key].filter(o => o.id === id) || []
              if (!arr.length) continue inner
              if (arr[0].required) {
                let msg = `${arr[0].name}不能为空`
                let boo = true
                if (arr[0].dataType === 'array') {
                  boo = !this.jnpf.isEmptyArray(item[id])
                } else {
                  boo = !this.jnpf.isEmpty(item[id])
                }
                if (!boo) {
                  this.$message({
                    message: msg,
                    type: 'error',
                    duration: 1000
                  })
                  isOk = false
                  break
                }
              }
            }
          }
        }
      }
      return isOk
    },
    judgeRequired(id) {
      if (!this.formOperates || !this.formOperates.length) return false
      let arr = this.formOperates.filter(o => o.id === id) || []
      if (!arr.length) return false
      let item = arr[0]
      return item.required
    },
    // 表单提交
    dataFormSubmit(eventType, flowUrgent) {
      if (eventType === 'audit' || eventType === 'reject') {
        this.$emit('eventReceiver', this.dataForm, eventType)
        return
      }
      this.dataForm.status = eventType === 'submit' ? 0 : 1
      this.dataForm.flowId = this.setting.flowId
      this.dataForm.flowUrgent = flowUrgent
      this.eventType = eventType
      if (this.eventType === 'submit') {
        this.$confirm('您确定要提交当前流程吗, 是否继续?', '提示', {
          type: 'warning'
        }).then(() => {
          this.request()
        }).catch(() => {
        })
      } else {
        this.request()
      }
      // this.$refs['elForm'].validate((valid) => {
      //   if (valid) {
      //     if (this.exist && !this.exist()) return
      //     if (eventType === 'audit' || eventType === 'reject') {
      //       this.$emit('eventReceiver', this.dataForm, eventType)
      //       return
      //     }
      //     this.dataForm.status = eventType === 'submit' ? 0 : 1
      //     this.dataForm.flowId = this.setting.flowId
      //     this.dataForm.flowUrgent = flowUrgent
      //     this.eventType = eventType
      //     if (this.eventType === 'submit') {
      //       this.$confirm('您确定要提交当前流程吗, 是否继续?', '提示', {
      //         type: 'warning'
      //       }).then(() => {
      //         this.request()
      //       }).catch(() => {
      //       })
      //     } else {
      //       this.request()
      //     }
      //   }
      // })
    },
    request() {

      var _data = this.dataList()
      var id = this.dataForm.id
      delete this.dataForm.id
      _data.type = '5'
      _data.zcdgId = id
// 初始化各面积的总和
      let totalBuildingArea = 0;
      let totalLandArea = 0;
      let totalSharedLandArea = 0;
      let totalBuildingMeasurementArea = 0;
      let totalExclusiveArea = 0;
      let totalSharedArea = 0;

// 遍历数据，累加各项面积
      for (let i = 0; i < _data.newData.length; i++) {
        const item = _data.newData[i];
        totalBuildingArea += item.jnpf_zcgl_zcdj_area_jnpf_buildingArea || 0;
        totalLandArea += item.jnpf_zcgl_zcdj_area_jnpf_landArea || 0;
        totalSharedLandArea += item.jnpf_zcgl_zcdj_area_jnpf_sharedLandArea || 0;
        totalBuildingMeasurementArea += item.jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea || 0;
        totalExclusiveArea += item.max_jnpf_zcgl_zcdj_area_jnpf_exclusiveArea || 0;
        totalSharedArea += item.jnpf_zcgl_zcdj_area_jnpf_sharedArea || 0;
      }
// 使用累加和进行条件判断
      if (totalBuildingArea > this.old_max_jnpf_zcgl_zcdj_area_jnpf_buildingArea) {
        this.$message({
          message: "拆分面积之和不能大于父体证载建筑面积",
          type: 'error',
          duration: 1000
        });
        return;
      }

      if (totalLandArea > this.old_max_jnpf_zcgl_zcdj_area_jnpf_landArea) {
        this.$message({
          message: "拆分面积之和不能大于证载土地面积",
          type: 'error',
          duration: 1000
        });
        return;
      }

      if (totalSharedLandArea > this.old_max_jnpf_zcgl_zcdj_area_jnpf_sharedLandArea) {
        this.$message({
          message: "拆分面积之和不能大于证载共有土地面积",
          type: 'error',
          duration: 1000
        });
        return;
      }

      if (totalBuildingMeasurementArea > this.old_max_jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea) {
        this.$message({
          message: "拆分面积之和不能大于建筑测量面积",
          type: 'error',
          duration: 1000
        });
        return;
      }

      if (totalExclusiveArea > this.old_max_jnpf_zcgl_zcdj_area_jnpf_exclusiveArea) {
        this.$message({
          message: "拆分面积之和不能大于建筑套内面积",
          type: 'error',
          duration: 1000
        });
        return;
      }

      if (totalSharedArea > this.old_max_jnpf_jnpf_zcdj_area_jnpf_sharedArea) {
        this.$message({
          message: "拆分面积之和不能大于建筑分摊面积",
          type: 'error',
          duration: 1000
        });
        this.$forceUpdate();
        return;
      }


      // _data.status =  this.dataForm.status
      // _data.statflowIdus =this.dataForm.flowId
      // _data.flowUrgent = this.dataForm.flowUrgent
      // this.dataForm.zcgl_zcdj_area.buildingArea =    this.dataForm.jnpf_zcgl_zcdj_area_jnpf_buildingArea
      // this.dataForm.zcgl_zcdj_area.landArea   =  this.dataForm.jnpf_zcgl_zcdj_area_jnpf_landArea
      // this.dataForm.zcgl_zcdj_area.sharedLandArea   =    this.dataForm.jnpf_zcgl_zcdj_area_jnpf_sharedLandArea
      // this.dataForm.zcgl_zcdj_area.buildingMeasurementArea   =    this.dataForm.jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea
      // this.dataForm.zcgl_zcdj_area.landSurveyArea   =    this.dataForm.jnpf_zcgl_zcdj_area_jnpf_landSurveyArea
      // this.dataForm.zcgl_zcdj_area.exclusiveArea   =    this.dataForm.jnpf_zcgl_zcdj_area_jnpf_exclusiveArea
      // this.dataForm.zcgl_zcdj_area.sharedArea    =    this.dataForm.jnpf_zcgl_zcdj_area_jnpf_sharedArea

      if (!this.dataForm.id) {
        request({
          url: '/api/example/ZcglZcdjInfoChange',
          method: 'post',
          data: _data
        }).then((res) => {
          this.$message({
            message: res.msg,
            type: 'success',
            duration: 1000,
            onClose: () => {
              this.visible = false
              this.$emit('close', true)
            }
          })
        })
      } else {
        request({
          url: '/api/example/ZcglZcdjInfo/' + this.dataForm.id,
          method: 'PUT',
          data: _data
        }).then((res) => {
          this.$message({
            message: res.msg,
            type: 'success',
            duration: 1000,
            onClose: () => {
              this.visible = false
              this.$emit('close', true)
            }
          })
        })
      }
    },
    openSelectDialog(key) {
      this.currTableConf = this.addTableConf[key]
      this.currVmodel = key
      this.selectDialogVisible = true
      this.$nextTick(() => {
        this.$refs.selectDialog.init()
      })
    },
    addForSelect(data) {
      for (let i = 0; i < data.length; i++) {
        let item = { ...this.tableRows[this.currVmodel], ...data[i] }
        this.dataForm[this.currVmodel].push(item)
      }
    },
    dataList() {
      var _data1 = JSON.parse(JSON.stringify(this.editableTabs))
     //  alert(_data)
     //  alert(_data.length)
     // return
     var data = []
      for (let i = 0; i < _data1.length; i++) {
        var _data = this.editableTabs[i].content
        if (_data.zcFmImage) {
          _data.zcFmImage = _data.zcFmImage;
        }

        if (_data.zcFile) {
          _data.zcFile =_data.zcFile;
        }

        // if (_data.zcgl_zcdj_warrant && _data.zcgl_zcdj_warrant.productionFile) {
        //   _data.zcgl_zcdj_warrant.productionFile = JSON.stringify(_data.jnpf_zcgl_zcdj_warrant_jnpf_productionFile);
        // }
        //
        // if (_data.zcgl_zcdj_warrant && _data.zcgl_zcdj_warrant.productionImage) {
        //   _data.zcgl_zcdj_warrant.productionImage = JSON.stringify(_data.jnpf_zcgl_zcdj_warrant_jnpf_productionImage);
        // }
        //
        // if (_data.zcgl_zcdj_photo && _data.zcgl_zcdj_photo.photoImage) {
        //   _data.zcgl_zcdj_photo.photoImage = JSON.stringify(_data.jnpf_zcgl_zcdj_photo_jnpf_photoImage);
        // }
        _data.zcgl_zcdj_warrant.propertyRight = _data.jnpf_zcgl_zcdj_warrant_jnpf_propertyRight
        _data.zcgl_zcdj_warrant.warrantNumber = _data.jnpf_zcgl_zcdj_warrant_jnpf_warrantNumber
        _data.zcgl_zcdj_warrant.landUse = _data.jnpf_zcgl_zcdj_warrant_jnpf_landUse
        _data.zcgl_zcdj_warrant.housePurpose = _data.jnpf_zcgl_zcdj_warrant_jnpf_housePurpose
        _data.zcgl_zcdj_warrant.zzPropertyOwner = _data.jnpf_zcgl_zcdj_warrant_jnpf_zzPropertyOwner
        _data.zcgl_zcdj_warrant.xzPropertyOwner = _data.jnpf_zcgl_zcdj_warrant_jnpf_xzPropertyOwner
        _data.zcgl_zcdj_warrant.address = _data.jnpf_zcgl_zcdj_warrant_jnpf_address
        _data.zcgl_zcdj_warrant.useNature = _data.jnpf_zcgl_zcdj_warrant_jnpf_useNature
        _data.zcgl_zcdj_warrant.buildings = _data.jnpf_zcgl_zcdj_warrant_jnpf_buildings
        _data.zcgl_zcdj_warrant.layers = _data.jnpf_zcgl_zcdj_warrant_jnpf_layers
        _data.zcgl_zcdj_warrant.numberFloors = _data.jnpf_zcgl_zcdj_warrant_jnpf_numberFloors
        _data.zcgl_zcdj_warrant.startTime = _data.jnpf_zcgl_zcdj_warrant_jnpf_startTime
        _data.zcgl_zcdj_warrant.endTime = _data.jnpf_zcgl_zcdj_warrant_jnpf_endTime
        _data.zcgl_zcdj_warrant.issuanceTime = _data.jnpf_zcgl_zcdj_warrant_jnpf_issuanceTime
        _data.zcgl_zcdj_warrant.custodyLocation = _data.jnpf_zcgl_zcdj_warrant_jnpf_custodyLocation
        _data.zcgl_zcdj_warrant.notes = _data.jnpf_zcgl_zcdj_warrant_jnpf_notes
        // _data.zcgl_zcdj_warrant.productionFile = JSON.stringify(_data.jnpf_zcgl_zcdj_warrant_jnpf_productionFile)
        // _data.zcgl_zcdj_warrant.productionImage = JSON.stringify(_data.jnpf_zcgl_zcdj_warrant_jnpf_productionImage)
        _data.zcgl_zcdj_area.buildingArea = _data.jnpf_zcgl_zcdj_area_jnpf_buildingArea
        _data.zcgl_zcdj_area.landArea = _data.jnpf_zcgl_zcdj_area_jnpf_landArea
        _data.zcgl_zcdj_area.sharedLandArea = _data.jnpf_zcgl_zcdj_area_jnpf_sharedLandArea
        _data.zcgl_zcdj_area.buildingMeasurementArea = _data.jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea
        _data.zcgl_zcdj_area.landSurveyArea = _data.jnpf_zcgl_zcdj_area_jnpf_landSurveyArea
        _data.zcgl_zcdj_area.exclusiveArea = _data.jnpf_zcgl_zcdj_area_jnpf_exclusiveArea
        _data.zcgl_zcdj_area.sharedArea = _data.jnpf_zcgl_zcdj_area_jnpf_sharedArea
        _data.zcgl_zcdj_photo.photoTime = _data.jnpf_zcgl_zcdj_photo_jnpf_photoTime
        // _data.zcgl_zcdj_photo.photoImage = JSON.stringify(_data.jnpf_zcgl_zcdj_photo_jnpf_photoImage)

        _data.zcgl_zcdj_area.buildingArea =   _data.jnpf_zcgl_zcdj_area_jnpf_buildingArea
        _data.zcgl_zcdj_area.landArea   =  _data.jnpf_zcgl_zcdj_area_jnpf_landArea
        _data.zcgl_zcdj_area.sharedLandArea   =   _data.jnpf_zcgl_zcdj_area_jnpf_sharedLandArea
        _data.zcgl_zcdj_area.buildingMeasurementArea   =    _data.jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea
        _data.zcgl_zcdj_area.landSurveyArea   =    _data.jnpf_zcgl_zcdj_area_jnpf_landSurveyArea
        _data.zcgl_zcdj_area.exclusiveArea   =    _data.jnpf_zcgl_zcdj_area_jnpf_exclusiveArea
        _data.zcgl_zcdj_area.sharedArea    =    _data.jnpf_zcgl_zcdj_area_jnpf_sharedArea

        data.push(_data)
      }
     this.dataForm.newData = data
      var _data = JSON.parse(JSON.stringify(this.dataForm))

      return _data
    },
    dataInfo(dataAll) {
      let _dataAll = dataAll
      _dataAll.zcFmImage = JSON.parse(_dataAll.zcFmImage)
      _dataAll.zcFile = JSON.parse(_dataAll.zcFile)
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_propertyRight = _dataAll.zcgl_zcdj_warrant.propertyRight
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_warrantNumber = _dataAll.zcgl_zcdj_warrant.warrantNumber
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_landUse = _dataAll.zcgl_zcdj_warrant.landUse
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_housePurpose = _dataAll.zcgl_zcdj_warrant.housePurpose
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_zzPropertyOwner = _dataAll.zcgl_zcdj_warrant.zzPropertyOwner
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_xzPropertyOwner = _dataAll.zcgl_zcdj_warrant.xzPropertyOwner
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_address = _dataAll.zcgl_zcdj_warrant.address
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_useNature = _dataAll.zcgl_zcdj_warrant.useNature
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_buildings = _dataAll.zcgl_zcdj_warrant.buildings
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_layers = _dataAll.zcgl_zcdj_warrant.layers
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_numberFloors = _dataAll.zcgl_zcdj_warrant.numberFloors
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_startTime = _dataAll.zcgl_zcdj_warrant.startTime
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_endTime = _dataAll.zcgl_zcdj_warrant.endTime
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_issuanceTime = _dataAll.zcgl_zcdj_warrant.issuanceTime
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_custodyLocation = _dataAll.zcgl_zcdj_warrant.custodyLocation
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_notes = _dataAll.zcgl_zcdj_warrant.notes

      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_productionFile = _dataAll.zcgl_zcdj_warrant.productionFile ? JSON.parse(_dataAll.zcgl_zcdj_warrant.productionFile) : []
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_productionImage = _dataAll.zcgl_zcdj_warrant.productionImage ? JSON.parse(_dataAll.zcgl_zcdj_warrant.productionImage) : []
      _dataAll.jnpf_zcgl_zcdj_area_jnpf_buildingArea = _dataAll.zcgl_zcdj_area.buildingArea
      _dataAll.jnpf_zcgl_zcdj_area_jnpf_landArea = _dataAll.zcgl_zcdj_area.landArea
      _dataAll.jnpf_zcgl_zcdj_area_jnpf_sharedLandArea = _dataAll.zcgl_zcdj_area.sharedLandArea
      _dataAll.jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea = _dataAll.zcgl_zcdj_area.buildingMeasurementArea
      _dataAll.jnpf_zcgl_zcdj_area_jnpf_landSurveyArea = _dataAll.zcgl_zcdj_area.landSurveyArea
      _dataAll.jnpf_zcgl_zcdj_area_jnpf_exclusiveArea = _dataAll.zcgl_zcdj_area.exclusiveArea
      _dataAll.jnpf_zcgl_zcdj_area_jnpf_sharedArea = _dataAll.zcgl_zcdj_area.sharedArea
      _dataAll.jnpf_zcgl_zcdj_photo_jnpf_photoTime = _dataAll.zcgl_zcdj_photo.photoTime

      _dataAll.jnpf_zcgl_zcdj_photo_jnpf_photoImage = _dataAll.zcgl_zcdj_photo.photoImage ? JSON.parse(_dataAll.zcgl_zcdj_photo.photoImage) : []

      // _dataAll.jnpf_zcgl_zcdj_photo_jnpf_photoImage = JSON.parse(_dataAll.zcgl_zcdj_photo.photoImage)



      this.max_jnpf_zcgl_zcdj_area_jnpf_buildingArea = _dataAll.jnpf_zcgl_zcdj_area_jnpf_buildingArea
      this.max_jnpf_zcgl_zcdj_area_jnpf_landArea = _dataAll.jnpf_zcgl_zcdj_area_jnpf_landArea
      this.max_jnpf_zcgl_zcdj_area_jnpf_sharedLandArea = _dataAll.jnpf_zcgl_zcdj_area_jnpf_sharedLandArea
      this.max_jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea = _dataAll.jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea
      this.max_jnpf_zcgl_zcdj_area_jnpf_landSurveyArea = _dataAll.jnpf_zcgl_zcdj_area_jnpf_landSurveyArea
      this.max_jnpf_zcgl_zcdj_area_jnpf_exclusiveArea = _dataAll.jnpf_zcgl_zcdj_area_jnpf_exclusiveArea
      this.max_jnpf_jnpf_zcdj_area_jnpf_sharedArea = _dataAll.jnpf_zcgl_zcdj_area_jnpf_sharedArea

      this.old_max_jnpf_zcgl_zcdj_area_jnpf_buildingArea = JSON.parse(JSON.stringify(_dataAll.jnpf_zcgl_zcdj_area_jnpf_buildingArea));
      this.old_max_jnpf_zcgl_zcdj_area_jnpf_landArea = JSON.parse(JSON.stringify(_dataAll.jnpf_zcgl_zcdj_area_jnpf_landArea));
      this.old_max_jnpf_zcgl_zcdj_area_jnpf_sharedLandArea = JSON.parse(JSON.stringify(_dataAll.jnpf_zcgl_zcdj_area_jnpf_sharedLandArea));
      this.old_max_jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea = JSON.parse(JSON.stringify(_dataAll.jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea));
      this.old_max_jnpf_zcgl_zcdj_area_jnpf_landSurveyArea = JSON.parse(JSON.stringify(_dataAll.jnpf_zcgl_zcdj_area_jnpf_landSurveyArea));
      this.old_max_jnpf_zcgl_zcdj_area_jnpf_exclusiveArea = JSON.parse(JSON.stringify(_dataAll.jnpf_zcgl_zcdj_area_jnpf_exclusiveArea));
      this.old_max_jnpf_jnpf_zcdj_area_jnpf_sharedArea = JSON.parse(JSON.stringify(_dataAll.jnpf_zcgl_zcdj_area_jnpf_sharedArea));


      this.dataForm = _dataAll
    },
    dataInfo3(dataAll) {

      let _dataAll = JSON.parse(dataAll)


      function safeParseJSON(data) {
        try {
          return typeof data === 'string' ? JSON.parse(data) : data
        } catch (e) {
          console.error('Parsing error:', e)
          return null // 或者根据需要返回其他默认值
        }
      }

// 处理 newData 中的 zcFile 和 zcFmImage
      if (_dataAll.newData) {
        let newDataParsed = safeParseJSON(_dataAll.newData)
        if (newDataParsed) {
          if (newDataParsed.zcFile != '') {
            newDataParsed.zcFile = newDataParsed.zcFile ? JSON.stringify(newDataParsed.zcFile) : []

          }
          if (newDataParsed.zcFmImage != '') {
            newDataParsed.zcFmImage = newDataParsed.zcFmImage ? JSON.stringify(newDataParsed.zcFmImage) : []

          }

        }
      }

      this.dataForm = _dataAll



      if (typeof this.dataForm.newData === 'string') {
        this.dataForm.newData = JSON.parse(this.dataForm.newData)
      } else {
        this.dataForm.newData = this.dataForm.newData
      }
      // this.dataForm = this.dataForm.newData
      for (let i = 0; i < this.dataForm.newData.length; i++) {

        // 2. 创建新的标签页数据
        const newTab = {
          title: `资产${i+1}`,
          name: String(i+1), // 统一使用字符串类型
          active: 0,
          dataRule: {  },
          content:this.dataForm.newData[i] // 使用单独的方法初始化表单数据
        };
        this.editableTabs.push(newTab)
        this.editableTabsValue = '1'
        this.$forceUpdate()

      }

      // this.dataFormNew = JSO1N.parse(JSON.stringify(this.dataForm))
    },
  }
}

</script>
<style scoped>
/* 容器样式 */
.container {
  position: relative;
  min-height: 100vh; /* 确保容器高度占满整个视口 */
}

/* 长内容区域，用于测试滚动 */
.long-content {
  padding-bottom: 60px; /* 为底部div留出空间 */
}

/* 固定在底部的div */
.fixed-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40px; /* 高度设置为60px */
  background-color: #f5f5f5; /* 背景色 */
  border-top: 1px solid #ddd; /* 顶部边框 */
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1); /* 阴影效果 */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000; /* 确保在最上层 */
}

/* 内容样式 */
.content {
  display: flex;
  gap: 20px; /* 设置文字之间的间距 */
  font-family: Arial, sans-serif;
  color: #333;
  white-space: nowrap; /* 确保文字不换行 */
  overflow-x: auto; /* 如果内容超出宽度，允许横向滚动 */
  padding: 0 20px; /* 左右内边距 */
}

.content span {
  font-size: 1em; /* 字体大小 */
  font-weight: bold; /* 字体加粗 */
}
.el-textarea.is-disabled .el-textarea__inner {

  color: black !important;
}

.el-input.is-disabled .el-input__inner {
  color: black !important;

}

/deep/ .el-input__inner {
  background: white !important;

}

/deep/ .el-textarea__inner {
  background: white !important;
}

.el-input.is-disabled .el-input__inner {

  background: white !important;
}
</style>
